# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=libqmi
pkgver=1.26.2
pkgrel=0
pkgdesc="QMI modem protocol helper library"
url="https://www.freedesktop.org/wiki/Software/libqmi"
arch="all"
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
makedepends="glib-dev gtk-doc libgudev-dev libmbim-dev linux-headers python3"
subpackages="
	$pkgname-dev
	$pkgname-doc
	$pkgname-bash-completion
	"
source="https://www.freedesktop.org/software/libqmi/libqmi-$pkgver.tar.xz"

# Tests fail
[ "$CARCH" = s390x ] && options="$options !check"

build() {
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--disable-static \
		--enable-mbim-qmux \
		--enable-qrtr \
		--enable-more-warnings=yes
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="040bd6b6ffb5f268e20970b5b63e6483bb8f31d4555e303fca00710479e167593249a771e79bde32883e8e0f6dc17a44ea99f824f85ab09188c5d984a7939f05  libqmi-1.26.2.tar.xz"
